home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / lib / pm-utils / power.d / sched-powersave < prev   
Text File  |  2009-10-06  |  693b  |  32 lines

  1. #!/bin/sh
  2.  
  3. path_mc="/sys/devices/system/cpu/sched_mc_power_savings"
  4. path_smt="/sys/devices/system/cpu/sched_smt_power_savings"
  5. val=0
  6.  
  7. case "$1" in
  8.     true)
  9.         echo "**sched policy powersave ON"
  10.         val=1
  11.         ;;
  12.     false)
  13.         echo "**sched policy powersave OFF"
  14.         val=0
  15.         ;;
  16. esac
  17.  
  18. # Based on the values (1-enable, 0-disable) for these controls,
  19. # sched groups cpu power will be determined for different domains.
  20. # When power savings policy is enabled and under light load conditions,
  21. # scheduler will minimize the physical packages/cpu cores carrying the
  22. # load and thus conserving power
  23.  
  24. if [ -w "$path_mc" ] ; then
  25.     echo $val > $path_mc
  26. fi
  27. if [ -w "$path_smt" ] ; then
  28.     echo $val > $path_smt
  29. fi
  30.  
  31. exit 0
  32.